Package MusicLandscape
Class Venue
- java.lang.Object
-
- MusicLandscape.Venue
-
public class Venue extends java.lang.Object- Version:
- 234
- Author:
- TeM
- Stage:
- ES04
- Introduced in:
- ExerciseSheet02 (provided)
- Programming problem category:
- simple entity classes
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCapacity()get the capacity of this venuejava.lang.StringgetName()get the name of this venuevoidsetCapacity(int capacity)set the capacity of this venue the capacity must be a non-negative number.voidsetName(java.lang.String name)set the name of this venue
-
-
-
Constructor Detail
-
Venue
public Venue()
creates a default venue a default venue has the name "unknown" (without quotes) and capacity 0.
-
Venue
public Venue(Venue v)
creates a copy of a venue- Parameters:
v- the original venue to copied- Introduced in:
- ExerciseSheet03
- Programming problem aspect:
- copy constructor
-
-
Method Detail
-
getCapacity
public int getCapacity()
get the capacity of this venue- Returns:
- the capacity
-
setCapacity
public void setCapacity(int capacity)
set the capacity of this venue the capacity must be a non-negative number. all other values are ignored, the object remains unchanged.- Parameters:
capacity- to set
-
getName
public java.lang.String getName()
get the name of this venue- Returns:
- the name
-
setName
public void setName(java.lang.String name)
set the name of this venue- Parameters:
name- the name to set
-
-